package com.yaorange.teaching.mapper;

import java.util.List;
import java.util.Set;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yaorange.teaching.bo.HighInterviewMasteryDetailBo;
import com.yaorange.teaching.bo.QueryInterviewMasteryDegreeBo;
import com.yaorange.teaching.domain.YaHighInterview;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 高频面试题Mapper接口
 *
 * @author ruoyi
 * @date 2024-11-15
 */
public interface YaHighInterviewMapper extends BaseMapper<YaHighInterview>
{
    /**
     * 查询高频面试题
     *
     * @param id 高频面试题主键
     * @return 高频面试题
     */
    public YaHighInterview selectYaHighInterviewById(Long id);

    /**
     * 查询高频面试题列表
     *
     * @param yaHighInterview 高频面试题
     * @return 高频面试题集合
     */
    public List<YaHighInterview> selectYaHighInterviewList(YaHighInterview yaHighInterview);

    /**
     * 新增高频面试题
     *
     * @param yaHighInterview 高频面试题
     * @return 结果
     */
    public int insertYaHighInterview(YaHighInterview yaHighInterview);

    /**
     * 修改高频面试题
     *
     * @param yaHighInterview 高频面试题
     * @return 结果
     */
    public int updateYaHighInterview(YaHighInterview yaHighInterview);

    /**
     * 删除高频面试题
     *
     * @param id 高频面试题主键
     * @return 结果
     */
    public int deleteYaHighInterviewById(Long id);

    /**
     * 批量删除高频面试题
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteYaHighInterviewByIds(Long[] ids);

    List<HighInterviewMasteryDetailBo> selectHighInterviewMasteryDetailList(QueryInterviewMasteryDegreeBo queryInterviewMasteryDegreeBo);

    List<YaHighInterview> selectYaHighInterviewListByKeywords(@Param("keywords") Set<String> keywords);

    @Select("select interview_id from ya_course_design_interview where cd_id = #{cdId}")
    List<Long> selectRelatedInterviewIdList(@Param("cdId") Long cdId);
}
